using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Windows.Forms;
using DevExpress.XtraEditors;
using InfoExpress.HIV.WinApp.Utils;

namespace InfoExpress.HIV.WinApp.Popups
{
  public partial class FrmBaoCaoThang : XtraForm
  {
    #region Members and Properties

    private string _trungTam = string.Empty;
    private int _thang = 0;
    private int _nam = 0;

    #endregion

    #region Constructors

    public FrmBaoCaoThang()
    {
      InitializeComponent();
    }

    public FrmBaoCaoThang(string trungTam, int thang, int nam)
      : this()
    {
      _trungTam = trungTam;
      _thang = thang;
      _nam = nam;
    }

    #endregion

    #region Event Handlers

    private void FrmBaoCaoThang_Load(object sender, EventArgs e)
    {
      LoadData();
    }

    #region Command Handlers

    private void btnPrint_Click(object sender, EventArgs e)
    {

    }

    #endregion

    #region Data Loading

    private void bwDataLoading_DoWork(object sender, DoWorkEventArgs e)
    {
      try
      {
      }
      catch (Exception ex)
      {
      }
    }

    private void bwDataLoading_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
    {
      Cursor = Cursors.Default;
      MainFormUtils.StopProgress();
      MainFormUtils.SetLoadedStatus();
    }

    #endregion DataLoading BackgroundWorker

    #endregion

    #region Helper Methods

    private void LoadData()
    {
      lblTrungTam.Text = _trungTam;
      lblThang.Text = _thang.ToString();
      lblNam.Text = _nam.ToString();

      Cursor = Cursors.WaitCursor;
      MainFormUtils.StartProgress();
      MainFormUtils.SetLoadingStatus();
      bwDataLoading.RunWorkerAsync();
    }

    #endregion
  }
}